<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||	
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws. 
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.). 
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations). 
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/classes/smarty/plugins/modifier.plural.php, $Author:  $ */

/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */


/**
 * Smarty capitalize modifier plugin
 *
 * Type:     modifier<br>
 * Name:     plural<br>
 * Purpose:  makes plural (table -> tables, status->ststuses, etc.)
 * @param string
 * @return string
 */
function smarty_modifier_plural($string)
{
    if (in_array(substr($string,-1), array('s','z')) ||
        in_array(substr($string,-2), array('sh','ch')) )
        $string .= 'es';
    else
        $string .= 's';
    return $string;
}

?>